package cn.bgs.service.impl;

import cn.bgs.mapper.VisitorMapper;
import cn.bgs.page.PageRequest;
import cn.bgs.pojo.CommunityActivities;
import cn.bgs.pojo.VisitorsRecord;
import cn.bgs.service.VisitorService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class VisitorServiceImpl implements VisitorService {
    @Autowired
    private VisitorMapper visitorMapper;

    @Override
    public PageInfo<VisitorsRecord> activitySelect(PageRequest pageRequest,String visitorsName) {
        PageHelper.startPage(pageRequest.getPageNum(),pageRequest.getPageSize());
        PageInfo<VisitorsRecord> userPageInfo = new PageInfo<>(visitorMapper.selectAll(visitorsName));
        return userPageInfo;
    }
}
